import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
const index = resolve => require(['@/views/index'], resolve)
const taskCategory = resolve => require(['@/views/taskCategory/taskCategory'], resolve)
const taskDetail = resolve => require(['@/views/taskDetail/taskDetail'], resolve)
const error404 = resolve => require(['@/views/error404/error404'], resolve)
const login = resolve => require(['@/views/login/index'], resolve)
const handValidate = resolve => require(['@/views/handValidate/handValidate'], resolve)
const dragTest = resolve => require(['@/views/dragTest/dragTest'], resolve)

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/task',
      name: 'task',
      component: index
    },
    {
      path: '/task/Category',
      name: 'taskCategory',
      component: taskCategory
    },
    {
      path: '/task/detail',
      name: 'taskDetail',
      component: taskDetail
    },
    {
      path: '/login',
      name: 'taskLogin',
      component: login
    },
    {
      path: '/handValidate',
      name: 'handValidate',
      component: handValidate
    },
    {
      path: '/dragTest',
      name: 'dragTest' ,
      component: dragTest
    }
    // {
    //   path: '/',
    //   name: 'HelloWorld',
    //   component: HelloWorld
    // },
    //{
    //  path: '*',
    //  name: 'error404',
    //  component: error404
    //}
  ]
})
